/*
 * 文件名： BisRealNameCertifyManagerImpl.java
 * 
 * 工程名称: bis-manager
 *
 * Gopay
 *
 * 创建日期： 2016年6月13日
 *
 * Copyright(C) 2016, by www.gopay.com.cn Inc.All rights reserved.
 *
 * 原始作者: 宣广海
 *
 */
package com.gopay.bis.manager.bank.tolly.impl;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.gopay.bis.dao.tolly.BisRealNameCertifyDAO;
import com.gopay.bis.manager.bank.tolly.BisRealNameCertifyManager;
import com.gopay.common.domain.bis.BisRealNameCertify;
import com.gopay.common.util.DateUtils;

/**
 * 实名认证业务操作实现类
 *
 * @author 宣广海
 *
 * @version
 *
 * @since 2016年6月13日
 */
@Service("bisRealNameCertifyManager")
public class BisRealNameCertifyManagerImpl implements BisRealNameCertifyManager {
	
	@Resource(name = "bisRealNameCertifyDAO")
	private BisRealNameCertifyDAO bisRealNameCertifyDAO;

	@Override
	public BisRealNameCertify getBisRealNameCertify(String name, String cardNo, String certifyCode) {
		return bisRealNameCertifyDAO.getBisRealNameCertify(name, cardNo, certifyCode);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED, rollbackFor = { Exception.class })
	public void insertBisRealNameCertify(BisRealNameCertify bisRealNameCertify) {
		/**
		 * 设置当前时间
		 */
		Date currDate = DateUtils.getSystemDate();
		bisRealNameCertify.setCreatedTs(currDate);
		bisRealNameCertify.setLastUpdTs(currDate);
		bisRealNameCertifyDAO.insertBisRealNameCertify(bisRealNameCertify);

	}

    @Override
    public BisRealNameCertify getBisMobileCertify(String name, String identityCode, String mobile, String outStlmcd) {
        return bisRealNameCertifyDAO.getBisMobileCertify(name, identityCode, mobile, outStlmcd);
                
    }

    @Override
    public BisRealNameCertify getBisBankCardCertify(String name, String identityCode, String mobile, String bankCardNo,
            String outStlmcd) {
        return bisRealNameCertifyDAO.getBisBankCardNoCertify(name, identityCode, mobile, bankCardNo,outStlmcd);
    }
}
